﻿using System;
using System.Web;

namespace com.fly.sms
{
    public class ActionControl
    {
        public static void dispatch(HttpContext context)
        {
            IAction action=null;
            string act = context.Request["act"];
            switch(act){
                case "Customer.login":
                    action = new LoginAction(context);
                    break;
                case "Customer.getPublicNotice":
                    action = new PublicNoticeAction(context);
                    break;
                case "Customer.getNotify":
                    action = new NotifyAction(context);
                    break;
                case "Customer.get":
                    action = new GetAction(context);
                    break;
                case "Customer.getByName":
                    action = new GetByNameAction(context);
                    break;
                case "Customer.changePass":
                    action = new ChangePassAction(context);
                    break;
                case "Customer.searchCashPay":
                    action = new CashPayAction(context);
                    break;
                case "Customer.searchCardPay":
                    action = new CardPayAction(context);
                    break;
                case "Customer.searchBalance":
                    action = new BalanceAction(context);
                    break;
                case "CustomerAddressBook.add":
                    action = new CustomerAddressBookAddAction(context);
                    break;
                case "CustomerAddressBook.update":
                    action = new CustomerAddressBookUpdateAction(context);
                    break;
                case "CustomerAddressBook.delete":
                    action = new CustomerAddressBookDeleteAction(context);
                    break;
                case "CustomerAddressBook.get":
                    action = new CustomerAddressBookGetAction(context);
                    break;
                case "CustomerAddressBook.search":
                    action = new CustomerAddressBookSearchAction(context);
                    break;
                case "CustomerAddressBook.getDetail":
                    action = new CustomerAddressBookGetDetailAction(context);
                    break;
                case "CustomerAddressBook.Number.add":
                    action = new CustomerAddressBookNumberAddAction(context);
                    break;
                case "CustomerAddressBook.Number.update":
                    action = new CustomerAddressBookNumberUpdateAction(context);
                    break;
                case "CustomerAddressBook.Number.delete":
                    action = new CustomerAddressBookNumberDeleteAction(context);
                    break;
                case "CustomerAddressBook.Number.get":
                    action = new CustomerAddressBookNumberGetAction(context);
                    break;
                case "CustomerContent.get":
                    action = new CustomerContentGetAction(context);
                    break;
                case "CustomerContent.search":
                    action = new CustomerContentSearchAction(context);
                    break;
                case "CustomerContent.add":
                    action = new CustomerContentAddAction(context);
                    break;
                case "CustomerContent.update":
                    action = new CustomerContentUpdateAction(context);
                    break;
                case "CustomerContent.delete":
                    action = new CustomerContentDeleteAction(context);
                    break;
                case "CustomerNumberPool.get":
                    action = new CustomerNumberPoolGetAction(context);
                    break;
                case "CustomerNumberPool.search":
                    action = new CustomerNumberPoolSearchAction(context);
                    break;
                case "CustomerNumberPool.add":
                    action = new CustomerNumberPoolAddAction(context);
                    break;
                case "CustomerNumberPool.update":
                    action = new CustomerNumberPoolUpdateAction(context);
                    break;
                case "CustomerNumberPool.delete":
                    action = new CustomerNumberPoolDeleteAction(context);
                    break;
                case "CustomerNumberPool.getDetail":
                    action = new CustomerNumberPoolGetDetailAction(context);
                    break;
                case "SMS.searchSendSmsLog":
                    action = new SearchSendSmsLogAction(context);
                    break;
                case "SMS.getSendSmsDetail":
                    action = new SendDetailAction(context);
                    break;
                case "SMS.searchSendSmsNumber":
                    action = new SearchSendSmsNumberAction(context);
                    break;
                case "SMS.sendSms":
                    action = new SendSmsAction(context);
                    break;
                case "SMS.sendNumberPool":
                    action = new SendNumberPoolAction(context);
                    break;
                case "SMS.tongji":
                    action = new SendTongjiAction(context);
                    break;
                case "SMTask.submitSendTask":
                    action = new SendTaskAction(context);
                    break;
                case "SMTask.submitSendPoolTask":
                    action = new SendPoolTaskAction(context);
                    break;
                case "SMTask.search":
                    action = new SendTaskSearchAction(context);
                    break;
                case "SMTask.getDetail":
                    action = new SendTaskDetailAction(context);
                    break;
                case "SMTask.start":
                    action = new StartTaskAction(context);
                    break;
                case "SMTask.stop":
                    action = new StopTaskAction(context);
                    break;
                case "SqlExcuter.excuteQuery":
                    action = new SqlQueryAction(context);
                    break;
                case "SqlExcuter.excuteUpdate":
                    action = new SqlUpdateAction(context);
                    break;
                case "SqlExcuter.getCount":
                    action = new SqlQueryCountAction(context);
                    break;
                default:
                    action = new LoginAction(context);
                    break;
            }
            action.process();
        }
    }

}